package BankAdvance;

public class Account {
    public double balance;

    public Account(double init_balance){
        this.balance = init_balance;
    }

    public double getBalance() {
        return balance;
    }

    //存钱操作
    public void deposit(double amt){
        if (amt > 0){
            balance += balance;
            System.out.println("OK");
        }
    }

    //取钱操作
    public void  withdraw(double amt){
        if (balance >= amt){
            balance -= amt;
            System.out.println("取钱成功");
        }else {
            System.out.println("sorry");
        }
    }
}
